package br.com.example.webview;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class WebViewActivity extends Activity {

	private WebView webView;

	@SuppressLint("SetJavaScriptEnabled")
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.webview);

		webView = (WebView) findViewById(R.id.webView1);
		webView.getSettings().setJavaScriptEnabled(true);
		webView.setBackgroundColor(0);
		
		// webView.loadUrl("http://www.google.com");

		String customHtml = "<html><body align='center' background='fundop.jpg'>"			
				+ "<form name='form_usuario' id='form_usuario' name ='form_usuario' method='post'>"
				+ "<div><h2><font color='orange'>Equipar Acess&oacute;rio</font></h2></div>"
				+ "<table id='tab_usuario'>"
				+ "<tr><td><label for='usuario'>Usu&aacute;rio:</td>"
				+ "<td><input type='text' id='usuario'></td></tr>"
				+ "<tr><td><label for='senha'>Senha:</td>"
				+ "<td><input type='password' id='senha'></td></tr>"
				+ "<tr><td></td><td><input type='button' id='sair' value='Sair'>"
				+ "<input type='submit' id='acessar' value='Acessar'></td>"
				+ "</tr></table></form>" + "</body></html>";
		//webView.loadData(customHtml, "text/html", "UTF-8");
		webView.loadDataWithBaseURL("file:///android_res/drawable-hdpi/", customHtml, "text/html", "UTF-8", null);

	}

}